package com.uto.backend;

import java.util.Map;

import android.os.RemoteException;

import com.uto.backend.interfaces.IServerResponse;

public class ServerResponse {
	
	private boolean isOk;
	
	private String message;
	
	private Map<String,Object> data;
	
	public ServerResponse(String message , boolean isOk, Map<String,Object> data){
		this.message = message;
		this.isOk = isOk;
		this.data = data;
	}
	
	public IServerResponse.Stub getResponse(){
		return myResponse;
	}
	
	private IServerResponse.Stub myResponse = new IServerResponse.Stub(){

		
		public String getMessage() throws RemoteException {
			return ServerResponse.this.message;
		}

		
		public boolean isOk() throws RemoteException {
			return ServerResponse.this.isOk;
		}

		
		public Map getData() throws RemoteException {
			return ServerResponse.this.data;
		}
		
	};

}
